﻿using System.Data;
using MyWeb.Data;

namespace MyWeb.Business
{
    public class ProductService
    {
        private readonly ProductController _productController = new ProductController();

        #region [Product_GetByAll]

        public DataTable Product_GetByAll()
        {
            return _productController.Product_GetByAll();
        }

        #endregion

        #region [Product_GetById]

        public DataTable Product_GetById(string id)
        {
            return _productController.Product_GetById(id);
        }

        #endregion

        #region [Product_Insert]

        public void Product_Insert(ProductInfo product)
        {
            _productController.Product_Insert(product);
        }

        #endregion

        #region [Product_Update]

        public void Product_Update(ProductInfo product)
        {
            _productController.Product_Update(product);
        }

        #endregion

        #region [Product_Delete]

        public void Product_Delete(string id)
        {
            _productController.Product_Delete(id);
        }

        #endregion

        #region [Product_GetByGroupProductId]

        public DataTable Product_GetByGroupProductId(int groupProductId)
        {
            return _productController.Product_GetByGroupProductId(groupProductId);
        }

        #endregion

        #region [Product_ActiveStatus]

        public void Product_ActiveStatus(string id, int status)
        {
            _productController.Product_ActiveStatus(id, status);
        }

        #endregion

        #region [Product_SelectTop]

        public DataTable Product_SelectTop(string sql)
        {
            return _productController.Product_SelectTop(sql);
        }

        #endregion
    }
}